﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AltimilliaLibrary.Base_Object;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace AltimilliaLibrary.Dialog
{
  public class DialogComponent : IAltimilliaGameComponent
  {

    ContentManager Content;
    SpriteBatch batch;
    Texture2D texture;
    Rectangle position;
    SpriteFont font;


    public DialogComponent(SpriteBatch batch, ContentManager content)
    {
      this.batch = batch;
      this.Content = content;
    }

    public BaseManager Manager { get; set; }
    public bool Enabled { get; set; }

    public event EventHandler EnabledChanged;

    public void Update(Microsoft.Xna.Framework.GameTime gameTime)
    {
    }

    public int UpdateOrder { get; set; }

    public event EventHandler UpdateOrderChanged;


    public void Initialize()
    {
      texture = Content.Load<Texture2D>("GUI/conversationbox");
      font = Content.Load<SpriteFont>("SpriteFont1");
      position = new Rectangle((1024 - texture.Width)/2, (726 - texture.Height)/2, texture.Width, texture.Height);

    }



    public void Draw(Microsoft.Xna.Framework.GameTime gameTime)
    {
      batch.Begin();
      batch.Draw(texture, position, Color.White);
      batch.End();
    }

    public int DrawOrder { get; set; }

    public event EventHandler DrawOrderChanged;

    public bool Visible { get; set; }

    public event EventHandler VisibleChanged;

  }
}
